home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 687 b | 20 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 8208938 16-Nov-89 06:12
-
- From: PASCOE1 Pascoe, Geoff
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Re: C++ destructors
-
- Although I don't use C++, I think the proper way of doing this would be to put
- all your initialization in the constructor and all your freeing-like behavior
- in the destructor. Then, have I<MyClass> simply call the constructor and Free
- call the destructor. That way you get the same behavior whether you allocate
- on the stack or on the heap. Also, I would suggest you always make your
- constructors and destructors virtual.
-
- Geoff
-
-